Skip to content

Conversation

@nemo83
Copy link
Collaborator

@nemo83 nemo83 commented Aug 14, 2025

Docker filesystem management behaves differently on linux and macos. Non-existing folders, when mounted are created as root on linux but as current user on macos. This screws things up when stopping and/or cleaning up resources on linux, preventing the caribic script (which is run as current user) from working and incurring in permission denied when trying to delete root resources.

For this reason:

  1. a few folders are now manually created before docker compose up is called
  2. many docker-compose files are now have the user property specified (and defaulted to root)
  3. caribic now fetches the current user id and gid and passes them to the compose

Along with that, an additional change is rolling back the version of osmosis, as latest doesn't seem to be building on ubuntu.

EDIT: it now works with latest osmosis. but it requires both cosmos and osmosis to run as root. so a sudo rm -fr of the ~/.osmosisd-local folder is required. Not really time or willingness to debug osmosis code to make it to work in non-sudo user (within container).

@nemo83 nemo83 force-pushed the feat/linux-improvements-faster-bootstrap branch from bfdf080 to 3d711bf Compare September 1, 2025 12:59
@nemo83 nemo83 marked this pull request as ready for review September 3, 2025 10:40
verbose("✅ Osmosis configuration files copied successfully");
remove_previous_chain_data()?;
// This should not be required as each time it's restarted it wipes the .osmosisd-local data
// remove_previous_chain_data()?;
Copy link
Collaborator Author

@nemo83 nemo83 Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabianbormann this cleanup doesn't seem to be necessary. You can check the README.md in the localosmosis folder.

Can you remember any other reasons why this might be required?

make localnet-init

The command:

- Builds a local docker image with the latest changes
- Cleans the `$HOME/.osmosisd-local` folder

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok makes sense. It's just a re-write of the bash script. I assume we can just remove it ;)

@nemo83 nemo83 changed the title chore: asked claude to make this to work on linux. Fix permissions issues to allow incubator project to run on Linux. Sep 8, 2025
@nemo83 nemo83 force-pushed the feat/linux-improvements-faster-bootstrap branch from 788e292 to 2d1117b Compare September 8, 2025 08:53
@STATE="" docker compose -f tests/localosmosis/docker-compose.yml down

localnet-clean:
sudo rm -rf $(HOME)/.osmosisd-local/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabianbormann just a gotcha for you to know. following the pattern of "manually overriding files requiring changes that have been downloaded" I've replaced this localnet.mk files and fixed the "clean" command here to make it to work for latest osmosis. Just a heads up in case something breaks later ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants